package com.mydesign.demo.controller;

import com.mydesign.demo.model.ReturnResult;

import com.mydesign.demo.service.IFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("File")
public class FileController {
    @Autowired
    private IFileService fileService;
    @PostMapping("/uploadFile")
    public ReturnResult uploadFile(MultipartFile file){
        return fileService.uploadFile(file);
    }
}
